package com.wyzz.hr.action;

import java.util.List;

import com.wyzz.hr.base.BaseAction;
import com.wyzz.hr.bo.IEmployeeBo;
import com.wyzz.hr.bo.RoleBo;
import com.wyzz.hr.spring.SpringBeanFactory;

public class UserAddOrEditInit extends BaseAction {

	public UserAddOrEditInit() {
	}

	public List getEmpList() {
		return empList;
	}

	public void setEmplist(List empList) {
		this.empList = empList;
	}

	public List getRoleList() {
		return roleList;
	}

	public void setRoleList(List roleList) {
		this.roleList = roleList;
	}

	public String execute() throws Exception {
		try {
			RoleBo roleService = (RoleBo) SpringBeanFactory
					.getBean("roleService");
			roleList = roleService.getRoleList();
			IEmployeeBo empBo = (IEmployeeBo) SpringBeanFactory
					.getBean("empBo");
			empList = empBo.findNouserEmps();
			return "success";
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "success";
	}

	private static final long serialVersionUID = 0x989b6aL;
	private List roleList;
	private List empList;
}
